1. Field of the Invention
The present invention relates to a line buffer and a method of providing data to an image processor performing a 3×3 line interpolation method in a system having the image processor, such as a digital camera, and more particularly, to a line buffer and a method of providing 3×3 line data to an image processor required to perform a 3×3 line interpolation method using a single memory in a system, such as a digital camera, so as to reduce the number of addresses and memory control signals required for controlling the single memory.
2. Description of the Related Art
An apparatus, such as a digital camera, having an image processor, is required to output more information about each pixel to obtain a full color image since a single charge couple device (CCD) image sensor is used in the apparatus. At least three types of data are required to generate the same full color image. The at least three types of data are extracted from three independent R, G, B values (pixel data). A sensor (pixel), such as the CCD image sensor, corresponding to a color image is provided with a color filter array (CFA) having arranged sensors (pixels). A pixel value corresponding to one of R, G, B colors is generated from each of the arranged sensors, and pixel values corresponding to other ones of the R, G, B colors, which are not extracted from the each of the arranged sensors, can be calculated from the pixel values of the adjacent sensors disposed around the each of the arranged sensors using the CFA. This is a well-known general method in the apparatus, and a Bayer pattern (matrix) is known as the CFA. Color interpolation or color demisaicing is known for restoring the color image from the pixel values obtained from the sensors.
Interpolation algorithms to perform an interpolation method are classified into non-adaptive algorithms and adaptive algorithms. The non-adaptive algorithms has advantages in performing an interpolation procedure using a fixed (invariable) pattern with respect to all pixels, and the number of calculation operations performed in the interpolation procedure is reduced. To the contrary, the adaptive algorithms has advantages in obtaining the color image better than the non-adaptive algorithms. However, the number of calculation operations performed in the interpolation procedure increases in the adaptive algorithms since adjacent pixels disposed around a center pixel is used to calculate the pixel value corresponding to the other ones of the R, G, B colors, which are not extracted from the each of the sensors.
The interpolation method performed in the non-adaptive algorithms includes a most adjacent pixel interpolation method, a both line interpolation method, an intermediate value interpolation method, and an incremental color change interpolation method. Another method performed in the adaptive algorithms includes a pattern coinciding interpolation method, an interpolation method using a threshold-based variable of an inclined ratio, a boundary method, and a preservation interpolation method.
The CCD image sensor is provided with a plurality of optical diodes arranged on a silicon wafer, and the optical diodes convert optical energy into electrical energy when receiving light. A complementary metal oxide semiconductor (CMOS) image sensor consumes electrical power less than the CCD image sensor and is smaller in size than the CCD image sensor. However, the CMOS image sensor is a semiconductor image sensor having a reduced picture quality more than the CCD image sensor.
FIGS. 1A through 1D are views explaining a 3×3 line interpolation method of a Bayer pattern. When an apparatus receives the Bayer pattern having 3×3 lines shown in FIG. 1A, the apparatus generates R, G, and B values as follows.R(R1+R2+R3+R4)/4, G=(G1+G2+G3+G4)/4, B=B1
If the apparatus receives the Bayer pattern having the 3×3 lines shown in FIG. 1B, the apparatus generates the R, G, and B values as follows.R=(R1+R2)/2, G=G3, B=(B1+B2)/2
If the apparatus receives the Bayer pattern having 3×3 lines shown in FIG. 1C, the apparatus generates the R, G, and B values as follows.R=(R1+R2)/2, G=G3, B=(B1+B2)/2
If the apparatus receives the Bayer pattern having 3×3 lines shown in FIG. 1D, the apparatus generates the R, G, and B values as follows.R=R1, G=(G1+G2+G3+G4)/4, B=(B1+B2+B3+B4)/4
In the 3×3 Bayer pattern interpolation method, an average value of pixel values of adjacent pixels is calculated as described above. In another interpolation method, maximum and minimum pixel values are excluded from the pixel values to calculate the average values of the adjacent pixels. The apparatus requires to simultaneously input 3 line image data to the image processor so as for the image processor to perform the above interpolation method.
FIG. 2 is a block diagram showing a structure for inputting three line image data to an image processor 203 to perform a 3×3 line interpolation method.
First line image data each having m bits are inputted to a line buffer 202 of a memory controller 206 from an image sensor 201 having n pixels on each line according to vertical and horizontal synchronization signals vsync, hsync. The memory controller 206 stores the inputted first line image data in a first memory 204. Second line image data each having the m bits are inputted to the line buffer 202 of the memory controller 206 from the image sensor 201 having the n pixels on each line, the memory controller 206 stores the inputted second line image data in a second memory 205. The memory controller 206 transmits a control enable (CE) signal, a write enable (WE) signal, and an address signal (n) indicating locations, in which the first and second line image data are stored, together with the first and second line image data to the first and second memories 204, 205.
FIGS. 3A through 3D are timing charts showing an operation of a buffer simultaneously outputting the 3×3 line image data to the image processor to perform the 3×3 line interpolation method in accordance with the Bayer pattern shown in FIGS. 1A through 1D.
FIGS. 2 and 3A through 3D show a memory clock MLCK, a vertical synchronization signal VSYNC representing a starting point of a frame sensed by the image sensor 201, and a horizontal synchronization signal HSYNC representing a starting point of each line of the image data outputted from the image sensor 210. The image data constitutes the Bayer pattern (matrix) inputted from the image sensor 201. The pixel value of each image data has the m bits. In FIGS. 3A through 3D, the vertical and horizontal synchronization signals VSYNC, HSYNC are in a disable state when being a high level, and in an enable state when being a low level. As shown in FIGS. 3A through 3D, when the vertical synchronization signal VSYNC is in the enable state at a first time position t1, the image data corresponding to a single image frame starts to be outputted from the image sensor 201. When the horizontal synchronization signal HSYNC is in the enable state at a second time position t2, the memory controller 206 outputs the WE signal to the first memory 204, and the R, G, B image data of a first line is transmitted from the image sensor 201 to the memory controller 206. The memory controller 206 stores the R, G, B image data outputted between the second time position t2 and a third time position t3 in the first memory 204. When the horizontal synchronization signal HSYNC is in the enable state at a fourth time position t4, the memory controller 206 outputs the WE signal to the first memory 204, and the R, G, B image data of a second line is transmitted from the image sensor 201 to the memory controller 206. The memory controller 206 stores the R, G, B image-data outputted between the fourth time position t4 and a fifth time position t5 in the second memory 205. The first line image data stored in the first memory 204, the second line image data stored in the second memory 205, and the R, G, B image data of a third line outputted after a sixth time position t6 are transmitted to the image processor 203, which performs the 3×3 line interpolation method according to the memory clock MCLK.
According to the structure shown in FIG. 2, the apparatus requires two memories, such as the first and second memories 204, 205, to store the first line image data and the second line image data each having n pixels so as to supply the image processor 203 with 3×3 line data to perform the 3×3 line interpolation method. In addition, the CE and WE signals are required to enable the first and second memories 204, 205, and two different address signals (2 n) are needed to indicate the locations, in which the first and second line image data are stored in the first and second memories 204, 205, respectively.
Recently, as the number of the pixels mounted in the apparatus including the image processor 203, such as the digital camera or a digital camcorder, increases, a capacity of a memory, such as the first and second memories 204, 205, is required to be increased according to the increase of the number of the pixels mounted in the apparatus including the image processor 203, such as the digital camera or a digital camcorder. This causes not only a physical size of the memory but the number of the addresses and control signals, such as the CE or WE signal controlling the first and second memories 204, 205, to be increased, thereby making the use of the memory difficult.
A Japanese patent laid-open no. 2000-115480 discloses an image reading apparatus having a unit storing image data inputted from three image sensors in a unit of n bits in a memory. In the image reading apparatus, a data controller is disposed between the image sensor and the memory. The image data is stored in the data controller, and if the number of the image data is greater than a reference number, the image data stored in the data controller is outputted to the memory, thereby reducing a time period in which the image data is transmitted through a data line of the image reading apparatus. During an idling period of the data line, the image reading apparatus may use the data line to transmit data to a host computer.
However, memories used in the image reading apparatus for performing a 3×3 line interpolation method cannot be reduced to a single memory. Moreover, the control of the memories of the image reading apparatus can not be simplified although the image reading apparatus reduces the time period of the data line occupied by the image data.